package com.zfsn.okaria.viewbinding
import android.os.Bundle
import android.view.LayoutInflater
import androidx.appcompat.app.AppCompatActivity
import androidx.viewbinding.ViewBinding
import com.alibaba.android.arouter.launcher.ARouter
import com.elvishew.xlog.XLog
abstract class BaseActivity<VB : ViewBinding>(private val inflate: (LayoutInflater) -> VB) : AppCompatActivity() {
    lateinit var binding: VB
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        ARouter.getInstance().inject(this)
        intent.extras?.keySet()?.forEach {
            XLog.i("BaseActivity  ===>  onCreate  key:$it;  value:${intent?.extras?.get(it)}")
        }
        binding = inflate(layoutInflater)
        setContentView(binding.root)
        initView(savedInstanceState)
    }
   open fun initView(savedInstanceState: Bundle?){

    }
}